package com.junyang.showdata.utils;

import lombok.Getter;
import lombok.Setter;

/**
 * @param
 * @Author fusijia
 * @Date 2025/1/14 11:15
 * @notes
 */
@Setter
@Getter
public class UseException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    private int  code;
    private String msg;

    public UseException(int code,String msg){
        this.code = code;
        this.msg = msg;
    }
    public UseException(ResultCodeEnum returnCodeEnum){
        this.code = returnCodeEnum.getResultCode();
        this.msg = returnCodeEnum.getResultMsg();
    }

}

